package com.galen.manual.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

@Data
@Schema(description = "创建/更新手工品请求")
public class ProductCreateDTO {

    @Schema(description = "手工品名称", example = "手工编织手链", required = true)
    @NotBlank(message = "手工品名称不能为空")
    @Size(max = 100, message = "手工品名称长度不能超过100个字符")
    private String name;

    @Schema(description = "手工品描述", example = "精美手工编织手链，材料包齐全，适合初学者制作", required = true)
    @NotBlank(message = "手工品描述不能为空")
    @Size(max = 1000, message = "手工品描述长度不能超过1000个字符")
    private String description;

    @Schema(description = "价格", example = "15.50", required = true)
    @NotNull(message = "价格不能为空")
    @DecimalMin(value = "0.01", message = "价格必须大于0")
    private BigDecimal price;

    @Schema(description = "标签", example = "手工,编织,饰品,新手")
    @Size(max = 500, message = "标签长度不能超过500个字符")
    private String tags;

    @Schema(description = "手工品图片URL列表", example = "[\"https://example.com/image1.jpg\", \"https://example.com/image2.jpg\"]")
    private List<String> images;
}